#!/bin/bash

#author:hzwuyufeng
#email:hzwuyufeng@corp.netease.com

#create time:10/16/2015 #version:0.1

# All ndk project must be included
NDK_PROJECT_ARRAY=(
    "common/src/main/jni"
    "pdfium/src/main/jni"
)

# Build NDK project
function clean_ndk_project() {
    local PROJECT=$1
    ndk-build clean -C ${PROJECT}
}

# Build JNI
function clean_jni() {
    for project in "${NDK_PROJECT_ARRAY[@]}";
    do
        clean_ndk_project ${project}
    done
}

function clean_app() {
    ./gradlew -v
    ./gradlew clean
}

function clean() {
    clean_jni
    clean_app
}

clean